﻿using System;

namespace CabConfigProvisioning
{
    public interface IFciActions : IDisposable
    {
        IntPtr FileOpen(string sFilePath, int oflag, int pmode, ref int nError);

        Int32 FileRead(IntPtr hf, byte[] buffer, int cb, ref int nError);

        Int32 FileWrite(IntPtr hf, byte[] buffer, int cb, ref int nError);

        Int32 FileClose(IntPtr hfref, ref int nError);

        Int32 FileSeek(IntPtr hf, int nOfs, int nDirection, ref int nError);

        int FilePlaced(ref FciCabinetInfo cabInfo, string sFilePath, long cbFile, bool fContinuation); // The indicated callback function returns an application-defined value. However, a value of -1 indicates an error.

        int FileDelete(string sFilePath, ref int nError); // The indicated callback function returns 0 if successful; otherwise -1.

        bool GetTempFile(char[] sTempFilePath, int nTempPathSize); // The indicated callback function returns TRUE if successful; otherwise FALSE.

        bool GetNextCabinet(ref FciCabinetInfo cabInfo, ulong cbPrevCab);

        int Status(uint typeStatus, ulong cb1, ulong cb2);

        IntPtr GetOpenInfo(String pszName, out ushort pdate, out ushort ptime, out ushort pattribs, ref int nError);
    }
}
